#include<bits/stdc++.h>
#define N 110000
#define eps 1e-7
#define inf 1e9+7
#define db double
#define ll long long
#define ldb long double
#define ull unsigned long long
using namespace std;
inline int read()
{
    int x=0,flag=1;
    char ch=0;
    while(!isdigit(ch)){ch=getchar();if(ch=='-')flag=-1;}
    while(isdigit(ch)) {x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
    return x*flag;
}
struct Point{double x,y;};
typedef Point Vector;
Vector operator +(Vector a,Vector b){return (Vector){a.x+b.x,a.y+b.y};}
Vector operator -(Vector a,Vector b){return (Vector){a.x-b.x,a.y-b.y};}
Vector operator *(Vector a,double p){return (Vector){a.x*p,a.y*p};}
Vector operator /(Vector a,double p){return (Vector){a.x/p,a.y/p};}
const double pi=acos(-1);
int dcmp(double x){if(abs(x)<=eps)return 0;else return x>0?1:-1;}
double Dot(Vector a,Vector b){return a.x*b.x+a.y*b.y;}
double Length(Vector a){return sqrt(Dot(a,a));}
double Angle(Vector a,Vector b)
{
	return acos(Dot(a,b)/(Length(a)*Length(b)))*180/pi;
}
double Cross(Vector a,Vector b){return a.x*b.y-a.y*b.x;}
	
struct Line
{
	Point p;
	Vector v;
};
Point Get_Line_Intersection(Line a,Line b)
{
	Vector u=a.p-b.p;
	double t=Cross(b.v,u)/Cross(a.v,b.v);
	return a.p+a.v*t;
}	
double Area(Point a,Point b,Point c){return Cross(b-a,c-a);}
Point p[N];
bool cmp(Point a,Point b)
{
	if(a.x!=b.x)return a.x<b.x;
	else return a.y<b.y;
}
struct Monotonous_Queue
{
	Point Q[N];
	int L,R,ins_cnt,del_cnt,cnt[N];
	inline void clear()
	{
		L=1,R=0,ins_cnt=0,del_cnt=0;
		memset(Q,0,sizeof(Q));
		memset(cnt,0,sizeof(cnt));
	}
    inline void push(Point o,int flag)
	{
		while(L<=R && (R>1&&dcmp(Cross(o-Q[R-1],Q[R]-Q[R-1]))*flag<=0)) R--;
		Q[++R]=o;cnt[R]=++ins_cnt;
	}
	inline double query()
	{
		double ans=0;
		for(int i=L;i<R;i++)ans+=Length(Q[i+1]-Q[i]);
		return ans;
	}
	inline void pop()
	{
		del_cnt++;
		L+=(del_cnt==cnt[L]);
	}
}q;
int main()
{
	db ans=0;
	int n=read(),i;
	for(i=1;i<=n;i++)scanf("%lf%lf",&p[i].x,&p[i].y); 
	sort(p+1,p+n+1,cmp);
	q.clear();for(i=1;i<=n;i++)q.push(p[i],+1);ans+=q.query();
	q.clear();for(i=1;i<=n;i++)q.push(p[i],-1);ans+=q.query();
	printf("%.2lf",ans);	
	return 0;
}
